﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using IceStart.Utils;

namespace IceStart.Core
{
    public abstract class AbstractMagnetTie
    {
        public enum Size
        {
            Large, Medium, Small
        }

        public Size ButtonSize { get; set; }
        public abstract string ImagePath { get; set; }
    }

    public class FileMagnetTie : AbstractMagnetTie
    {
        public FileMagnetTie(string filePath)
        {
            ImagePath = filePath;
            ButtonSize = Size.Small;
            FilePath = filePath;
            MagnetTieName = filePath.Split("\\").Last().Split(".").First();
            FileName = GenericUtils.GetFileName(FilePath);
        }

        public string FileName { get; set; }
        public override string ImagePath { get; set; }
        public string FilePath { get; set; }
        public string MagnetTieName { get; set; }
    }

    public class ImageMagnetTie : AbstractMagnetTie
    {
        public ImageMagnetTie(string imagePath)
        {
            ImagePath = imagePath;
            ButtonSize = Size.Large;
        }

        public override string ImagePath { get; set; }
    }
}